From ccaacfc8c3815b60145cbebfadd662782670aa81 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Sat, 16 May 2020 08:12:50 +0200 Subject: [PATCH] texthandle: Remove min-width/height handling We do that automatically for all widgets. --- gtk/gtktexthandle.c | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c index 72ac92bea0..7da012c9e7 100644 --- a/gtk/gtktexthandle.c +++ b/gtk/gtktexthandle.c @@ -93,22 +93,6 @@ gtk_text_handle_native_get_surface_transform (GtkNative *native, *y = - margin_rect->origin.y; } -static void -gtk_text_handle_get_size (GtkTextHandle *handle, - gint *width, - gint *height) -{ - GtkWidget *widget = GTK_WIDGET (handle); - GtkStyleContext *context; - - context = gtk_widget_get_style_context (widget); - - if (width) - *width = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_MIN_WIDTH), 100); - if (height) - *height = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_MIN_HEIGHT), 100); -} - static void gtk_text_handle_get_padding (GtkTextHandle *handle, GtkBorder *border) @@ -300,15 +284,8 @@ gtk_text_handle_measure (GtkWidget *widget, int *minimum_baseline, int *natural_baseline) { - gint size; - - if (orientation == GTK_ORIENTATION_VERTICAL) - gtk_text_handle_get_size (GTK_TEXT_HANDLE (widget), NULL, &size); - else - gtk_text_handle_get_size (GTK_TEXT_HANDLE (widget), &size, NULL); - - *natural = size; - *minimum = size; + *natural = 0; + *minimum = 0; *minimum_baseline = -1; *natural_baseline = -1; } -- 2.30.2